package com.siloam.module;

import java.text.SimpleDateFormat;
import java.util.Date;
/**
 * 代祷事项
 * @author rzpeng
 *
 */
public class Prayer {
	
	public static final int SCOPE_GROUP = 1;	//小组范围
	public static final int SCOPE_ALL = 2; 		//所有人范围
	
	public static final int STATUS_ING = 1; 	//代祷中
	public static final int STUATUS_OVER = 2;	//代祷结束
	
	private int id;
	private String content;
	private Date date;
	private int status;
	private int scope;
	private User user;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public int getScope() {
		return scope;
	}
	public void setScope(int scope) {
		this.scope = scope;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public String getDateText(SimpleDateFormat sdf){
		return sdf.format(date);
	}
	
	public String getStatusText(){
		if(status == STATUS_ING){
			return "代祷中";
		} else {
			return "代祷结束";
		}
	}
	
	public String getScopeText(){
		if(scope == SCOPE_GROUP){
			return "小组内可见";
		} else {
			return "所有人可见";
		}
	}
	
	
}
